package com.bmps.springcloud.insuredmicroservice.model.accept;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;

/**
 * @author lyw
 * @date 2019-09-06 10:33:22
 */
public class DeclinatureRuleModel implements Serializable {
    /**
     * 非拒保核保规则标识
     */
    private Boolean insuredFlag;
    /**
     * 非拒保核保信息
     */
    private String insuredMessage;

    public Boolean getInsuredFlag() {
        return insuredFlag;
    }

    public void setInsuredFlag(Boolean insuredFlag) {
        this.insuredFlag = insuredFlag;
    }

    public String getInsuredMessage() {
        return insuredMessage;
    }

    public void setInsuredMessage(String insuredMessage) {
        this.insuredMessage = insuredMessage;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (o == null || getClass() != o.getClass()){
            return false;
        }

        DeclinatureRuleModel that = (DeclinatureRuleModel) o;

        return new EqualsBuilder()
                .append(insuredFlag, that.insuredFlag)
                .append(insuredMessage, that.insuredMessage)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(insuredFlag)
                .append(insuredMessage)
                .toHashCode();
    }

    @Override
    public String toString() {
        return "DeclinatureRuleModel{" +
                "insuredFlag=" + insuredFlag +
                ", insuredMessage='" + insuredMessage + '\'' +
                '}';
    }
}
